<%* page3.tpl --- Smarty template for third page of Ballot object test *%>


<% if $searchClouds %>
     <%include file="header.tpl" title="Ballot Tag Cloud" heading="Tag Clouds from Selected"%>
<% else %>
     <%include file="header.tpl" title="Issues Tag Cloud" heading="Issue Tag Clouds from Selected Candidates"%>

<% /if %>



     <table>

	  <%foreach from=$ofcArr key=office item=names name=outer%>

	  <h2 style="text-align:center"><%$office|capitalize%></h2>

	  <table width="100%" cellspacing="5" cellpadding="6" style="border: 1px solid #000000">
	  <tr>
	  <%foreach from=$names item=name %>
	  <th style="border: 1px #999999 solid"><%$name|capitalize%></th>
	  <% /foreach %>
	  </tr>
	  <tr>
	  <% foreach from=$clouds key=name item=c %><%* for each candidate there is a cloud *%>
	  <td style="text-align:center">
	  <% foreach from=$c item=cloudArray %>
	       <a href="<% $cloudArray.url %>" style="color: <%$cloudArray.color %>;" class="word size<% $cloudArray.range %>"><% $cloudArray.word %></a>
	  <% /foreach %>
	  </td>
     <% /foreach %>
     </tr>
     <% /foreach %>
     </table>
     <h3>Comparison Cloud</h3>
	  <table width="100%" cellspacing="5" cellpadding="6" style="border: 1px solid #000000">
	  <tr><th style="border: 1px #999999 solid">
	  <%foreach from=$names item=name name=candidates%>

	  <span style="color: <% $colors[$smarty.foreach.candidates.index] %>">&nbsp; <%$name|capitalize%> &nbsp;
	  <% /foreach %>
	  </th>
	  <tr><td>
	  <% foreach from=$combo item=data %>
	       <%  foreach from=$data key=name item=info %>
		    <% if is_array($info) %><%* then this is a name data array *%>
			 <a href="<% $info.url %>" style="color: <%$info.color %>;" class="word size<%$info.range%>">
			      <%$data.word %></a>
			 <%/if%>
		    <%/foreach%>

	  <%/foreach%>
	  </td></tr>
	  </table>

       <form method="link" action="index.php"> <input type="submit" value="Go Back"></form>
<%include file="footer.tpl"%>